package banzhuan.listen;

import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.OutputStream;
import java.io.OutputStreamWriter;


import android.app.Service;
import android.content.Intent;
import android.os.IBinder;

public class newgame extends Service {
	private String response="0";
	public String displayed="00000";
	private String ari="00000";
	
	@Override
	public void onCreate() {

       try {
			OutputStream os;
			os = this.openFileOutput("banzhuan4.txt",MODE_WORLD_WRITEABLE);
			OutputStreamWriter wos=new OutputStreamWriter(os);
			try {
				wos.write(response);
				wos.flush();
				wos.close();

			} catch (IOException e) {
				e.printStackTrace();
			}
			} catch (FileNotFoundException e1) {
			e1.printStackTrace();
			}
			
		       try {
					OutputStream os;
					os = this.openFileOutput("ari.txt",MODE_WORLD_WRITEABLE);
					OutputStreamWriter wos=new OutputStreamWriter(os);
					try {
						wos.write(ari);
						wos.flush();
						wos.close();

					} catch (IOException e) {
						e.printStackTrace();
					}
					} catch (FileNotFoundException e1) {
					e1.printStackTrace();
					}
				    	 try {
							OutputStream os;
							os = this.openFileOutput("ariD.txt",MODE_WORLD_WRITEABLE);
							OutputStreamWriter wos=new OutputStreamWriter(os);
							try {
								wos.write(displayed);
								wos.flush();
								wos.close();

							} catch (IOException e) {
								e.printStackTrace();
							}
							} catch (FileNotFoundException e1) {
							e1.printStackTrace();
							}


		    super.onCreate();

	   }
	
	
	
    @Override
	public void onStart(Intent intent, int startId) {

        super.onStart(intent, startId);

	}
	
    @Override
    public void onDestroy() {

    	super.onDestroy(); 
    	}
	
	@Override
	public IBinder onBind(Intent intent) {
		
		return null;
	}
	
	
	}